home *** CD-ROM | disk | FTP | other *** search
/ Freelog 117 / FreelogNo117-OctobreNovembre2013.iso / Programmation / jedit / jedit5.1.0install.exe / {app} / modes / objective-c.xml < prev    next >
Extensible Markup Language  |  2013-07-28  |  4KB  |  120 lines

  1. <?xml version="1.0"?>
  2.  
  3. <!DOCTYPE MODE SYSTEM "xmode.dtd">
  4.  
  5. <!-- Extension of c.xml to handle Objective-C keywords. -->
  6. <MODE>
  7.     <PROPS>
  8.         <PROPERTY NAME="commentStart" VALUE="/*" />
  9.         <PROPERTY NAME="commentEnd" VALUE="*/" />
  10.         <PROPERTY NAME="lineComment" VALUE="//" />
  11.         <PROPERTY NAME="wordBreakChars" VALUE=",+-=<>/?^&*" />
  12.  
  13.     <!-- Auto indent -->
  14.     <PROPERTY NAME="indentOpenBrackets" VALUE="{" />
  15.     <PROPERTY NAME="indentCloseBrackets" VALUE="}" />
  16.     <PROPERTY NAME="unalignedOpenBrackets" VALUE="(" />
  17.     <PROPERTY NAME="unalignedCloseBrackets" VALUE=")" />
  18.     <PROPERTY NAME="indentNextLine"
  19.         VALUE="\s*(((if|while)\s*\(|else\s*|else\s+if\s*\(|for\s*\(.*\))[^{;]*)" />
  20.     <PROPERTY NAME="unindentThisLine"
  21.         VALUE="^.*(default:\s*|case.*:.*)$" />
  22.     <PROPERTY NAME="electricKeys" VALUE=":" />
  23.     </PROPS>
  24.  
  25.     <RULES
  26.         IGNORE_CASE="FALSE"
  27.         HIGHLIGHT_DIGITS="TRUE" DIGIT_RE="[0-9][0-9a-zA-Z]*">
  28.         <EOL_SPAN TYPE="KEYWORD2" AT_WHITESPACE_END="TRUE" DELEGATE="CPP">#</EOL_SPAN>
  29.  
  30.         <IMPORT DELEGATE="c::LEX"/>
  31.         <IMPORT DELEGATE="c::CORE"/>
  32.         <IMPORT DELEGATE="CORE"/>
  33.     </RULES>
  34.  
  35.     <!-- Core language -->
  36.     <RULES SET="CORE"
  37.         IGNORE_CASE="FALSE"
  38.         HIGHLIGHT_DIGITS="TRUE" DIGIT_RE="[0-9][0-9a-zA-Z]*">
  39.         <KEYWORDS>
  40.             <!-- Types (Objective C) -->
  41.             <KEYWORD3>id</KEYWORD3>
  42.             <KEYWORD3>Class</KEYWORD3>
  43.             <KEYWORD3>SEL</KEYWORD3>
  44.             <KEYWORD3>IMP</KEYWORD3>
  45.             <KEYWORD3>BOOL</KEYWORD3>
  46.  
  47.             <!-- Keywords (Objective C) -->
  48.             <KEYWORD1>oneway</KEYWORD1>
  49.             <KEYWORD1>in</KEYWORD1>
  50.             <KEYWORD1>out</KEYWORD1>
  51.             <KEYWORD1>inout</KEYWORD1>
  52.             <KEYWORD1>bycopy</KEYWORD1>
  53.             <KEYWORD1>byref</KEYWORD1>
  54.             <KEYWORD1>self</KEYWORD1>
  55.             <KEYWORD1>super</KEYWORD1>
  56.  
  57.             <!-- Preprocessor Directives (Objective C)-->
  58.             <KEYWORD1>@interface</KEYWORD1>
  59.             <KEYWORD1>@implementation</KEYWORD1>
  60.             <KEYWORD1>@protocol</KEYWORD1>
  61.             <KEYWORD1>@end</KEYWORD1>
  62.             <KEYWORD1>@private</KEYWORD1>
  63.             <KEYWORD1>@protected</KEYWORD1>
  64.             <KEYWORD1>@public</KEYWORD1>
  65.             <KEYWORD1>@class</KEYWORD1>
  66.             <KEYWORD1>@selector</KEYWORD1>
  67.             <KEYWORD1>@endcode</KEYWORD1>
  68.             <KEYWORD1>@defs</KEYWORD1>
  69.  
  70.             <LITERAL2>TRUE</LITERAL2>
  71.             <LITERAL2>FALSE</LITERAL2>
  72.             <LITERAL2>YES</LITERAL2>
  73.             <LITERAL2>NO</LITERAL2>
  74.             <LITERAL2>NULL</LITERAL2>
  75.             <LITERAL2>nil</LITERAL2>
  76.             <LITERAL2>Nil</LITERAL2>
  77.         </KEYWORDS>
  78.     </RULES>
  79.  
  80.     <!-- Preprocessor specific rules -->
  81.     <RULES SET="CPP"
  82.         IGNORE_CASE="FALSE"
  83.         HIGHLIGHT_DIGITS="TRUE" DIGIT_RE="[0-9][0-9a-zA-Z]*">
  84.  
  85.         <EOL_SPAN_REGEXP HASH_CHAR="include" TYPE="MARKUP" DELEGATE="c::INCLUDE">include\b</EOL_SPAN_REGEXP>
  86.         <EOL_SPAN_REGEXP HASH_CHAR="import" TYPE="MARKUP" DELEGATE="c::INCLUDE">import\b</EOL_SPAN_REGEXP>
  87.         <EOL_SPAN_REGEXP HASH_CHAR="define" TYPE="MARKUP" DELEGATE="DEFINE">define\b</EOL_SPAN_REGEXP>
  88.         <EOL_SPAN_REGEXP HASH_CHAR="endif" TYPE="MARKUP" DELEGATE="c::LEX">endif\b</EOL_SPAN_REGEXP>
  89.         <EOL_SPAN_REGEXP HASH_CHAR="elif" TYPE="MARKUP" DELEGATE="c::CONDITION">elif\b</EOL_SPAN_REGEXP>
  90.         <EOL_SPAN_REGEXP HASH_CHAR="if" TYPE="MARKUP" DELEGATE="c::CONDITION">if\b</EOL_SPAN_REGEXP>
  91.  
  92.         <IMPORT DELEGATE="c::LEX"/>
  93.  
  94.         <!-- Directives -->
  95.         <KEYWORDS>
  96.             <MARKUP>ifdef</MARKUP>
  97.             <MARKUP>ifndef</MARKUP>
  98.             <MARKUP>else</MARKUP>
  99.             <MARKUP>error</MARKUP>
  100.             <MARKUP>line</MARKUP>
  101.             <MARKUP>pragma</MARKUP>
  102.             <MARKUP>undef</MARKUP>
  103.             <MARKUP>warning</MARKUP>
  104.         </KEYWORDS>
  105.     </RULES>
  106.  
  107.     <!-- After #define directive -->
  108.     <!-- Almost same as the normal code,
  109.         except two additional operators # and ##. -->
  110.     <RULES SET="DEFINE"
  111.         IGNORE_CASE="FALSE"
  112.         HIGHLIGHT_DIGITS="TRUE" DIGIT_RE="[0-9][0-9a-zA-Z]*">
  113.         <SEQ TYPE="OPERATOR">#</SEQ>
  114.         <IMPORT DELEGATE="c::LEX"/>
  115.         <IMPORT DELEGATE="c::CORE"/>
  116.         <IMPORT DELEGATE="CORE"/>
  117.     </RULES>
  118.  
  119. </MODE>
  120.